import type { ExtractProps } from '@/utils/type'
import styleVar from '@/styles/variable.module.scss'
import { toStrFirstCase } from '@/utils'

namespace Checkbox {
  export const name = toStrFirstCase(`${styleVar.namespace}Checkbox`)
  export const props = {
    modelValue: Boolean,
    disabled: Boolean
  }
  type BaseProps = ExtractProps.Types<typeof props>
  export const emits = {
    change: (_val: BaseProps['modelValue']) => true,
    'update:modelValue': (_val: BaseProps['modelValue']) => true
  }
  export type Props = BaseProps & PartialEmits<typeof emits>
  export const Component = <{
    new(): {
      $props: Props
    }
  }>{}
}
export default Checkbox